Skip to content

ICU-23354 Remove m_utilIntBuffer_ and m_utilStringBuffer_#3923

Open
gvictor wants to merge 1 commit intounicode-org:mainfrom
gvictor:icu23354
Open

ICU-23354 Remove m_utilIntBuffer_ and m_utilStringBuffer_#3923
gvictor wants to merge 1 commit intounicode-org:mainfrom
gvictor:icu23354

Conversation

@gvictor
Copy link
Copy Markdown
Collaborator

@gvictor gvictor commented Apr 1, 2026

.. from UCharacterName.AlgorithmName

The m_utilIntBuffer_ array in AlgorithmName is a 1KB int[256] that was eagerly initialized, leading to unnecessary memory consumption for instances that never use it (e.g., TYPE_0_ instances or unqueried algorithms).

Use a local variable instead for m_utilIntBuffer_ and m_utilStringBuffer_.

TODO: Please describe your changes here.

TODO: Please read the following on ICU Contributing, and then delete these instructions.

Thank you for your pull request!

TODO: Fill out the checklist below.

Checklist

  • Required: Issue filed: ICU-23354
  • Required: The PR title must be prefixed with a JIRA Issue number. Example: "ICU-NNNNN Fix xyz"
  • Required: Each commit message must be prefixed with a JIRA Issue number. Example: "ICU-NNNNN Fix xyz"
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable
  • Approver: Feel free to merge on my behalf

@gvictor gvictor requested a review from markusicu April 1, 2026 11:01
…cterName.AlgorithmName

The `m_utilIntBuffer_` array in `AlgorithmName` is a 1KB `int[256]`
that was eagerly initialized, leading to unnecessary memory
consumption for instances that never use it (e.g., `TYPE_0_` instances
or unqueried algorithms).

Use a local variable instead for m_utilIntBuffer_ and
m_utilStringBuffer_.
@jira-pull-request-webhook
Copy link
Copy Markdown

Notice: the branch changed across the force-push!

  • icu4j/main/core/src/main/java/com/ibm/icu/impl/UCharacterName.java is different
  • icu4j/main/core/src/main/java/com/ibm/icu/impl/UCharacterUtility.java is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@markusicu markusicu self-assigned this Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants